#ifndef CETELE_H
#define CETELE_H

#include <Fl/Fl.h>
#include <Fl/Fl_Group.h>
#include <Fl/Fl_Text_Buffer.h>
#include <Fl/Fl_Color_Chooser.h>
#include <fstream>
#include <vector>
#include "form.h"
#include "node.h"
#include "cizik.h"
#include "spritebox.h"
#include "component.h"
#include "econtainer.h"


class Node;
class Cizik;
class component;
class eContainer;
class Cetele : public Fl_Group
{
    public:
        Cetele(int x,int y,int w,int h,const char *p=0);
        virtual ~Cetele();
        int handle(int e);

        int getcizid();
        void setcizid();
        void cizgiAl(Cizik *p);
        void cizgiSil(Cizik *p);
        eContainer *textgonder();
        Cizik * cizgiVer();
        std::vector <Node *>tumnodetut;
        std::vector <Node *>nodeTut;
        std::vector <component *>compTut;
        void nodeSil(Node *p);
        void compsil(component *p);
        void metinSil(eContainer *p);
        std::string sirala(int sayi);
        static void sil_CB(void *userdata);
        void sil_CB2();

        static void tumusil_CB(Fl_Widget *p, void *userdata);
        void tumusil_CB2();
        Fl_Text_Buffer *buffer;
        static void yazdir_CB(void *userdata);
        void yazdir_CB2();
    protected:
        void draw();
    private:
        int nodeid;
        int bagid;
        int compid;
        Cizik *ciz;
        Eleman *yedek;
        eContainer *textyedek;
        std::vector <eContainer *>metinTut;
        std::vector <Cizik *>cizgiTut;
        std::string code;
};

#endif // CETELE_H
